#ifndef _core_dispatch_type_lookup_detail_default_hpp_
#define _core_dispatch_type_lookup_detail_default_hpp_

namespace core {

    namespace dispatch {

        //forward decl
        template <typename Key>
            struct unhandled_key;

        namespace type_lookup {

            namespace detail {

                template<typename R, typename Key>
                    struct throw_unhandled_key
                    {
                        R operator()(Key k) const
                        {
                            throw unhandled_key<Key>(k);
                            return R();
                        }
                    };

                template<typename Key>
                    struct throw_unhandled_key<void,Key>
                    {
                        void operator()(Key k) const
                        {
                            throw unhandled_key<Key>(k);
                        }
                    };

            }   // namespace detail
        } // namespace type_lookup
    } // namespace dispatch
} // namespace core

#endif // _core_dispatch_type_lookup_detail_default_hpp_
